<template>
    <div>
        <!--<recheck-form :form="form.recheckList[0]" v-if="form.recheckList.length == 1"></recheck-form>-->

        <el-collapse class="collapseList" v-model="activeNames" style="margin-left: 5%" accordion>
            <div v-for="recheck in form.recheckList">
                <el-collapse-item :title="recheck.creditNature" :name="recheck.creditNature">
                    <recheck-form  :form="recheck"></recheck-form>
                </el-collapse-item>
            </div>
        </el-collapse>

        <el-form ref="form" :model="form" label-width="150px"  :label-position="labelPosition" style="margin-left:5%">
            <!--<el-form-item label="复审审人 :">
                <span>{{form.secondReceiverName}}</span>
            </el-form-item>
            <el-form-item label="复审时间 :">
                <span>{{form.secondTime}}</span>
            </el-form-item>-->
            <!--<el-form-item label="" v-if="showText2" >
                <span  style="color: red;font-size:13px ">您的债权不予确认</span>
            </el-form-item>-->
            <el-form-item label="异议审核说明 :">
                <span>{{form.checkedNote}}</span>
            </el-form-item>
        </el-form>

        <span style="margin-top: 10%; width: 100%;color: red; text-align: center">{{form.specialNote}}</span>

       <!-- <span v-if="showRecheckTip" style="margin-top: 10%; width: 100%;color: red; text-align: center">如果您对管理人的复审结果仍有异议，可依法向人民法院提起诉讼。</span>-->

        <!--<div class="recheck-button" v-if="showButton">
            <el-button @click.native="toLawsuit" style="margin-right: 10%">法院诉讼</el-button>
            <el-button type="primary" @click.native="affirm" style="margin-left: 10%">确认金额</el-button>
        </div>-->

        <!--<el-dialog
                title="如果您对管理人的复审结果仍有异议，可依法向人民法院提起诉讼。"
                :visible.sync="lawSuitVisible"
                width="90%"
                center>
            <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="litigation">确  定</el-button>
                <el-button type="primary" @click="registerAgain = false">取  消</el-button>
            </span>
        </el-dialog>-->

        <div v-show="showRecheckButton">
            <el-button @click.native="toDissent" style="margin-left: 5%">修改异议</el-button>
        </div>
    </div>
</template>

<script>
    import RecheckForm from './recheck-form.vue'
    import util from 'assets/js/util.js'
    import conf from 'assets/js/conf.js'

    export default {
        data() {
            return {
                ccdList:[],
                checkedNote:'',
                lawSuitVisible: false,
                activeNames: [],
                specialNote:'',
                labelPosition: 'left',
                caseId: 0,
                creditorId: 0,
            }
        },
        props: [
           //'showButton',
            'form',
            'showRecheckButton'
           // 'showRecheckTip',
        ],
        mounted() {
           this.id = util.getUrlParam(document.location.href, 'id');
        },
        methods: {
            toDissent:function () {
                window.location.href = '../credit/dissent.html?'+ 'creditId=' + util.getUrlParam(document.location.href, 'id')+"&declareNote="+encodeURI(this.form.declareNote)+"&declareFileids="+this.form.declareFileids;
            }
            /*toLawsuit: function () {
                this.lawSuitVisible = true
            },
            affirm: function () {
                const _self = this;
                util.ajax({
                    url: `/creditInfo/sure`,
                    params: {creditId: util.getUrlParam(document.location.href, 'creditId')},
                    success: function (data) {
                        _self.$message({
                            message: '确认成功!',
                            center: true
                        });
                        window.location.href = '../index/index.html?';
                    },
                });
            },
            litigation: function () {
                const _self = this;
                util.ajax({
                    url:`/creditInfo/litigation`,
                    params: {creditId: util.getUrlParam(document.location.href, 'creditId')},
                    success: function (data) {
                        _self.$message({
                            message: '确认成功!',
                            center: true
                        });
                        window.location.href = '../index/index.html?';
                    },
                });
            },*/
        },
        components: {
            RecheckForm
        }
    }
</script>

<style scoped>
    .recheck-button {
        width: 100%;
        text-align: center;
        margin-top: 6%
    }

    .el-form-item {
        margin-bottom: 10px;
    }
</style>
